package com.kucun.service.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kucun.Dao.ClientinfoMapper;
import com.kucun.bean.Page;
import com.kucun.bean.Clientinfo;
import com.kucun.service.ClientinfoService;

@Service
@Transactional 
public class ClientinfoServiceImp implements ClientinfoService {

	@Resource
	private ClientinfoMapper clientinfoMapper;
	public int save(Clientinfo record) {
		return clientinfoMapper.insertSelective(record);
	}

	public boolean update(Clientinfo record) {
		return clientinfoMapper.updateByPrimaryKey(record);
	}

	public boolean delete(String userid) {
		return clientinfoMapper.deleteByPrimaryKey(userid);
	}


	public Clientinfo findById(int userid) {
		return clientinfoMapper.selectByPrimaryKey(userid);
	}


	public List<Clientinfo> findAll(Page page){
          return clientinfoMapper.findAll(page);
	}

	public List<Clientinfo> findAll(){
        return clientinfoMapper.findAll1();
	}
	
	public Page getCount(Page page1) {
		
		return clientinfoMapper.getCount(page1);
	}

	public int updateClientForDel(String ids) {
		return clientinfoMapper.updateClientForDel(ids);
	}

	public Integer updateByPrimaryKeySelective(Clientinfo re) {
		return clientinfoMapper.updateByPrimaryKeySelective(re);
	}

	public int delClientinfoForDel(String ids) {
		
		return clientinfoMapper.delClientinfoForDel(ids);
	}

	public List<Clientinfo> findAllDateNoPaging() {
		
		return clientinfoMapper.findAllDateNoPaging();
	}

	public boolean deleteTreeByPrimaryKey(Integer id) {
		
		return clientinfoMapper.deleteTreeByPrimaryKey(id);
	}

}
